/*
 * VacQuota.java
 *
 * Created on 21 marzec 2007, 22:24
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package data;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * @author xavex
 */
public class VacQuota implements Serializable, IDbObject {
    
    private Long id;
    private int quota;
    private Date fromDate;
    private Date toDate;
    private Team team;

    /** Creates a new instance of VacQuota */
    public VacQuota() {
    }
    

    public Date getFromDate() {
        return this.fromDate;
    }

    public void setFromDate(final Date from) {
        this.fromDate = from;
    }

    public Long getId() {
        return this.id;
    }

    private void setId(final Long id) {
        this.id = id;
    }

    public int getQuota() {
        return this.quota;
    }

    public void setQuota(final int quota) {
        this.quota = quota;
    }

    public Team getTeam() {
        return this.team;
    }

    public void setTeam(final Team team) {
        this.team = team;
    }

    public Date getToDate() {
        return this.toDate;
    }

    public void setToDate(final Date to) {
        this.toDate = to;
    }
    
    public String toString()
    {
        SimpleDateFormat dateFormatter = new SimpleDateFormat( "dd/MM/yy");
        return dateFormatter.format( getFromDate() ) + " - " +
                    dateFormatter.format( getToDate() ) + " : " + 
                    Integer.toString( getQuota() );
    }
}
